package com.example.softwareconfigurationcoursedesign.ShopPage;


public class Product {
    // 产品的属性
    public String pid;  // 产品ID
    public String pname;  // 产品名称
    public double pprice;  // 产品价格
    public String ptag;  // 产品标签
    public String purl;  // 产品链接

    public int id;  // ID
    public String detail;  // 产品详细信息

    // 构造方法，用于初始化产品对象
    public Product(String pid, String pname, double pprice, String ptag, String purl, int id, String detail) {
        this.pid = pid;
        this.pname = pname;
        this.pprice = pprice;
        this.ptag = ptag;
        this.purl = purl;
        this.id = id;
        this.detail = detail;
    }

    public Product() {
        // 无参构造方法
    }

    // getter 和 setter 方法，用于获取和设置属性值
    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getPurl() {
        System.err.println(purl);  // 打印产品链接信息，用于调试
        return purl;
    }

    public void setPurl(String purl) {
        this.purl = purl;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public double getPprice() {
        return pprice;
    }

    public void setPprice(double pprice) {
        this.pprice = pprice;
    }

    public String getPtag() {
        return ptag;
    }

    public void setPtag(String ptag) {
        this.ptag = ptag;
    }
}

